package com.zj.ssm12;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class Singleton {
	
	private enum SingletonEnum {
		SEED;
		
		private Singleton singleton;
		
		SingletonEnum(){
			singleton = new Singleton();
		}
		
		public Singleton getInstance() {
			return singleton;
		}
	}
	
	public static Singleton getInstance() {
		return SingletonEnum.SEED.getInstance();
	}
}
